package com.bovink.customalbum.album;

import java.io.File;
import java.io.FilenameFilter;

/**
 * @author Retina975
 * @since 2017/07/03
 */

public class AlbumUtils {

    //图片筛选器，过滤无效图片
    public static FilenameFilter imageFilter() {
        return new FilenameFilter() {
            @Override
            public boolean accept(File dir, String filename) {
                return filename.endsWith(".jpg") ||
                        filename.endsWith(".png") ||
                        filename.endsWith(".jpeg");
            }
        };
    }
}
